package com.shan.thread;

/**
 * description
 * 线程的使用测试类
 *
 * @author shanzheng <br/>
 * @date 17:56 2019/1/10.<br/>
 * Modified By <br/>
 */
public class CommonThread extends Thread {
    private static int count = 1;

    public CommonThread(String name) {
        super(name);
    }

    public static void main(String[] args) {
        CommonThread mt1 = new CommonThread("线程A");
        CommonThread mt2 = new CommonThread("线程B");
        mt1.start();
        mt2.start();
    }

    @Override
    public void run() {
        for (int i = 100; i > 0; i--) {
            count++;
            System.out.println(i + "===" + this.getName());
        }
    }

}
